package com.apes.fico.finance.model.statements;

import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @program: apestech
 * @description: 资产负债表模板定义
 * @author: Chengxm
 * @create: 2019-01-21 15:27
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = BalanceSheet.CONST_TABLE_NAME)
public class BalanceSheet implements ApesBean {
    public final static String CONST_TABLE_NAME = "gl_balance_sheet";
    @Id
    @Column(name = "id", nullable = false, length = 32)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "资产负债表", padding = 8)
    @Comment("编号")
    private String id;

    @Column(name = "ass", length = 400)
    @Comment("资产")
    private String ass;

    @Column(name = "ass_seq")
    @Comment("行次")
    private String assSeq;

    @Column(name = "liability_equity", length = 400)
    @Comment("负债和所有者权益")
    private String liabilityEquity;

    @Column(name = "liability_equity_seq")
    @Comment("行次")
    private String liabilityEquitySeq;

    @Column(name = "ass_equation")
    @Comment("资产公式")
    private String assEquation;

    @Column(name="liability_equation")
    @Comment("负债公式")
    private String liabilityEquation;
}
